package com.cuanbo.dualscreenteachfu.activity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.cuanbo.dualscreenteachfu.R;
import com.cuanbo.dualscreenteachfu.adapter.SignAdapter;
import com.cuanbo.dualscreenteachfu.base.LHBaseActivity;
import com.cuanbo.dualscreenteachfu.bean.SignBean;
import com.cuanbo.dualscreenteachfu.utils.BroadcastUtil;

import java.util.ArrayList;
import java.util.List;

/**
 *签到详情
 */
public class SignActivity extends LHBaseActivity {
    private View rootView;
    private SignAdapter signAdapter;
    private RecyclerView rvSign;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        rootView= LayoutInflater.from(this).inflate(R.layout.activity_sign,null);
        setContentView(rootView);
        init();
    }

    public void init(){
        initView();
        initSignAdapter();
    }

    public void initView() {
        rvSign = rootView.findViewById(R.id.rvSign);
    }

    private void initSignAdapter() {
        rvSign.setLayoutManager(new GridLayoutManager(this, 7));
        List<SignBean> list=new ArrayList<>();
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        list.add(new SignBean());
        signAdapter = new SignAdapter(list);
        rvSign.setAdapter(signAdapter);
    }
    
    @Override
    public void requestData() {
        
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    /**
     *返回
     */
    public void btnBack(View v) {
        BroadcastUtil.sendBroadcastToZhuScreen(4);
        finish();
    }
}